home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 25 / AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso / Tools / SFX-Player / Mpeg / MrMPEG / PlayMain.rexx < prev    next >
OS/2 REXX Batch file  |  2000-05-08  |  2KB  |  66 lines

  1. /* PlayMain.rexx */
  2.  
  3. options results; address MrMPEG
  4.  
  5. MUIA_List_Active    = 0x8042391c;    MUIA_Disabled        = 0x80423661
  6.  
  7. list ID SLIST ATTRS MUIA_List_Active
  8. list ID SLIST POS result
  9. if result ~= '' then do
  10.   parse var result filename','dummy
  11.   if ~exists(filename) then do
  12.     temp_string = "Could not open the file '"filename"'."
  13.     request ID WARN GADGETS '"OK"' temp_string
  14.     call Stop()
  15.     check ID PLAY ATTRS MUIA_Disabled 0
  16.     return
  17.   end
  18.   call GetInfo()
  19.   image ID RWND ATTRS MUIA_Disabled 1
  20.   image ID FFWD ATTRS MUIA_Disabled 1
  21.   slider ID PROG ATTRS MUIA_Disabled 1
  22.   slider ID PRIO ATTRS MUIA_Disabled 1
  23.   knob ID VOLM; volume = '-v'result
  24.   check ID MONO
  25.   if result = 0 then stereo = '-m'
  26.   else stereo = ''
  27.   check ID FILT; filter = '-f'||result
  28.   cycle ID DIVS
  29.   if result = '1:1' then division = '-d1'
  30.   else if result = '1:2' then division = '-d2'
  31.   else division = '-d4'
  32.   cycle ID QUAL
  33.   if result = 'Low' then quality = '-q0'
  34.   else if result = 'Medium' then quality = '-q1'
  35.   else quality = '-q2'
  36.   slider ID PRIO; priority = '-p'result
  37.   cycle ID MAXF
  38.   if result = 'OFF' then maxf = ''
  39.   else maxf = '-F'result
  40.   cycle ID MIXF
  41.   if result = 'OFF' then mixf = ''
  42.   else mixf = '-x'result
  43.   cycle ID ABUF; abuffer = '-t'result * 1000
  44.   cycle ID IBUF; ibuffer = '-b'result
  45.   text ID AHID; parse var result 'br'ahi_id
  46.   check ID UAHI
  47.   if result = 1 then ahi = '-I'ahi_id
  48.   else ahi = ''
  49.   popasl ID PATH; pathname = result
  50.   slider ID PROG; position = result * 1000
  51.   setvar current_time right(result % 60, 2, 0)":"right(result // 60, 2, 0)
  52.   setvar current_song filename
  53.   address command 'run <>NIL: rx Timer.rexx'
  54.   check ID PLAY ATTRS MUIA_Disabled 0
  55.   address command pathname'MPEGA >NIL: -n -w -S'position ahi division quality stereo volume filter mixf maxf priority filename abuffer ibuffer
  56.   image ID RWND ATTRS MUIA_Disabled 0
  57.   image ID FFWD ATTRS MUIA_Disabled 0
  58.   slider ID PROG ATTRS MUIA_Disabled 0
  59.   slider ID PRIO ATTRS MUIA_Disabled 0
  60. end /* of if result */
  61. else do
  62.   call Stop()
  63.   check ID PLAY ATTRS MUIA_Disabled 0
  64. end
  65. return
  66.